package com.atom.wyz.new_opengl;

import android.content.Context;

import com.atom.wyz.new_opengl.ndk.SimpleNDKGLSurfaceView;
import com.atom.wyz.new_opengl.simple.SimpleGLSurfaceView;

public class GLSurfaceViewFactory {
    private Context context ;
    public GLSurfaceViewFactory(Context context){
        this.context = context ; 
    }

    public AbstractGLSurfaceView getView(String string){
        AbstractGLSurfaceView view = null  ;
        switch (string){
            case "simple" :
                view = new SimpleGLSurfaceView(context) ;
                break ;
            case "simpleNDK" :
                view = new SimpleNDKGLSurfaceView(context) ;
                break ;
        }
        assert view != null;
        view.requestFocus();
        view.setFocusableInTouchMode(true);
        return view ;
    }
}
